home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-03-16 | 1.6 KB | 52 lines | [TEXT/GEOL] |
- Item 9757426 14-March-90 06:24PST
-
- From: V0683 Amoco Tech, Eric Berdahl,VAR
-
- To: MACAPP.TECH$ MacApp Technical
- CPLUS.DEV$ C++ Interest List--Developers
- CPLUS.APPLE$ C++ Interest List--Apple Employees
-
- Sub: ¿TExtendedText from C++?
-
- Gentlepersons,
-
- I am trying to use the TExtendedText object (on the MacApp Goodies Vol 2 disk)
- from my C++ MacApp program. It works very well, doing exactly what I want
- (kudos to whoever developed the sucker!) with one glaring exception. When I do
- a GetValue(), GetValue itself calculates the value properly, but somehow it
- gets mangled in the return to the C++ calling routine. The value that is
- assigned to the C++ extended variable is 0.0. Can anybody help me? Relevant
- code sections follow:
-
- class TExtendedText : public TEditText {
- public:
- ...
- virtual pascal extended GetValue();
- ...
- };
-
- pascal void
- TMyCommand::DoIt()
- {
- ...
- TWindow* aWindow;
- ...
- extended anExtended;
- ...
- anExtended = ((TExtendedText*)aWindow->FindSubView('mnod'))->GetValue();
- printf("GetValue returned %lf\n", anExtended);
- ...
- }
-
- I also put a Writeln('GetValue = ', theValue) in TExtendedText.GetValue to
- print the value which is being calculated. I think the problem rests in the
- actual returning code to the C routine. (Oh, it may be important to know: MPW
- 3.1, MacApp 2.0b9, C++ 3.1b1, on a MacIIx, System 6.0.3, code compiled -mc68020
- and -mc68881.)
-
- Thanx in advance,
- Eric Berdahl
- Amoco Technology Company
- AppleLink: V0683
-
-